﻿function start() {
    var categorySearch = document.getElementById("CategoryID");

    categorySearch.onchange = function () {
        var chosenOption = this.options[this.selectedIndex];
        
        window.location.href = "/Event/Index?categoryID=" + chosenOption.value;
    }
}

window.addEventListener("load", start, false);